package com.example.apis.article;

import com.example.model.article.dtos.ArticleDto;
import com.example.model.common.dtos.ResponseResult;
import io.swagger.models.auth.In;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("youthnews-article")
public interface iArticleClient {

    @PostMapping("/feign/v1/article/save")
    public ResponseResult saveArticle(@RequestBody ArticleDto dto);

    @PostMapping("/feign/v1/article/addCommentsNum")
    public ResponseResult addCommentsNum(@RequestParam("articleId") String articleId);

    @PostMapping("/feign/v1/article/getCommentsNum")
    public ResponseResult getCommentsNum(@RequestParam("id") Integer id);

    @PostMapping("/feign/v1/article/getArticleByAclId")
    public ResponseResult getArticleByAclId(@RequestParam("id") Integer id);

    @PostMapping("/feign/v1/article/getArticleByArticleId")
    public ResponseResult getArticleByArticleId(@RequestParam String articleId);

}
